The present invention relates to the art of object code translators which operate on a host processing system to emulate a second operating system. More particularly, the present invention relates to the art of dynamic object code translators which perform analysis and computation of an original object code instruction set in real time during execution on a host processor having a host processor object code instruction set.
In the field of object code translators, it becomes necessary to convert object code which has been developed for one computer on another computer having a different computer architecture. Conversion methods for such object code include a conventional method entitled a xe2x80x9cstatic object code conversion method,xe2x80x9d in which instruction statements are first converted into an object code of a second architecture before execution. A second conventional method is a xe2x80x9cdynamic object code conversion method,xe2x80x9d in which a first object code is converted into a second object code while executing instructions.
In the art of static object code conversion methods, execution time is not influenced by the time required for conversion. However, the physical size of the converted object code becomes large upon execution of the static object code conversion. In other words, in the static object code conversion method, a number of operating steps in the converted object code inevitably increases. As a result, there is a problem in that performance of the converted object code deteriorates and inefficiencies are introduced.
On the other hand, in the dynamic object code conversion method, the size of the converted object code becomes relatively small in comparison with the static converted object code. However, the conventional dynamic object code conversion method has a problem in that all objects, including seldom used objects, are converted. In other words, the conventional dynamic object code conversion method fails to efficiently recognize objects which are executed plural times and thereby increases the time needed for conversion of the original object code while sacrificing efficiency.
Accordingly, it is an object of the present invention to provide an object code translator which address the problems in the art while providing dynamic optimization of the translated object code.
It is a further object of the present invention to profile a major program until a compiler completes compiling, with the is profile being used by the compiler to compile and optimize the program.
It is an even further object of the present invention to jump from non-translated code to translated during dynamic optimization and compilation.
It is an even further object of the present invention to provide a dynamic optimizing object code translator with software feedback which computes difference between a number of translation requests sent to the compiler and a number of translations completed.
A further object of the present invention is to provide a dynamic translation of a computer program in one machine language into another machine language while the program is running.
Moreover, it is an object of the present invention to provide a dynamic object code translator which determines segments for translation from a plurality of seeds which correspond to branches in a source object code.
Objects of the present invention are achieved by a computer architecture emulation system which emulates a source computer architecture on a destination computer architecture, including an interpreter for individually translating source object code into corresponding translated object code and for determining a number of executions of branch instructions in the source object code; and a compiler for grouping instructions of the source object code into a segment when a number of executions of a corresponding branch instruction exceeds a threshold number, and for dynamically compiling the segment.
Objects of the present invention are further achieved by a computer architecture emulation system which emulates a source computer architecture on a destination computer architecture system, including a plurality of interpreters for individually translating source object code into corresponding translated object code, wherein each of the plurality of interpreters profile source object code branch information in real time while executing translated object code instructions; and a compiler for grouping source object code instructions from any of the plurality of interpreters into segments based upon corresponding branch instructions in the source object code and for dynamically compiling the segments of the source object code when the corresponding branch instruction is greater than a threshold number.
Even further objects of the present invention are achieved by a computer architecture emulation system which emulates a source computer architecture on a destination computer architecture system, including an interpreter for individually translating source object code into corresponding translated object code, wherein the interpreter profiles branch instructions of the source object code by storing a number executions for each branch instruction and comparing the number of executions with a threshold number, such that branch instructions which exceed the threshold number are seeds; and a compiler for grouping the source object code instructions into segments based upon the seeds and dynamically compiling the segments of the source object code during translation and profiling by the interpreter.
Additional objects of the present invention are achieved by a multi-tasking computer architecture emulation system which emulates a source computer architecture on a multi-tasking destination computer architecture, including an interpreter task for individually translating source object code into corresponding translated object code and for determining a number of executions of branch instructions in the source object code; and a compiler task operating with the interpreter on the multi-tasking destination computer architecture, for grouping instructions of the source object code into a segment when a number of executions of a corresponding branch instruction exceeds a threshold number, and for dynamically compiling the segment.